{% extends "html/sidebar.html" %}

{% block style %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/chooseGame.css" />
{% endblock style %}

{% block script %}
    {{ block.super }}
    <script type="text/javascript" src="{{STATIC_URL}}js/chooseGame.js" ></script>
{% endblock script%}

{% block content %}
    {{ block.super }}
    <div id='gameSelectOuter'>   
        Select an existing game or Start a new one
	   {% for game in allGames %}
            <h3><a href='#' class='accordionHeader'>Game {{ forloop.counter }}</a></h3>
            <div id='gameInfo{{ forloop.counter }}'>
                <a href='{% url travel_game.views.loadGame game.id %}'
                    class='games'>Continue Game</a></br>
                Game date: {{ game.party_set.all.0.date }}</br>
                Distance from start: {{  game.party_set.all.0.distanceFromStart }}</br>
                Profession: {{ game.party_set.all.0.profession }}</br>
                Money: {{ game.party_set.all.0.money }}</br>
                Rations: {{ game.party_set.all.0.rations }}</br>
                Pace: {{ game.party_set.all.0.pace }}</br>
            </div>
        {% endfor %}          
    </div>
	<div id="newGame"> <a href='{% url travel_game.views.startUp %}' class='games'>New Game</a> </div>
{% endblock content %}
